/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ceair.flight.refund.service.cronjob.autocheck.impl;

import com.ceair.flight.refund.dto.appmoblie.RefundApplyDto;
import com.ceair.flight.refund.location.dt.enums.RefundReasonEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author youguilin
 */
abstract class BaseAutoChecker extends AbstractAutoChecker {

    private static final Logger LOG = LoggerFactory.getLogger(BaseAutoChecker.class);

    public BaseAutoChecker(String checkerName) {
        super(checkerName);
        LOG.debug("Creating auto checker with check name {}", checkerName);
    }

    protected RefundReasonEnum getRefundReason(final RefundApplyDto refundApply) {
        String reasonCode = refundApply.getClaimReason();
        return RefundReasonEnum.getByCode(reasonCode);
    }

}
